<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="renderer" content="webkit">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>添加页面</title>

    <link rel="shortcut icon" href="favicon.ico">
    <link href="/admin/css/bootstrap.min14ed.css?v=3.3.6" rel="stylesheet">
    <link href="/admin/css/font-awesome.min93e3.css?v=4.4.0" rel="stylesheet">
    <link href="/admin/css/animate.min.css" rel="stylesheet">
    <link href="/admin/css/style.min862f.css?v=4.1.0" rel="stylesheet">
    <link href="/admin/frame/layer/css/layui.css" rel="stylesheet">
</head>
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="ibox float-e-margins">
        <div class="ibox-title">
            <h5>
                <ol class="breadcrumb br-0">
                    <li><a href="javascript:void(0)">资金管理</a></li>
                    <li class="active">手动退款</li>
                </ol>
            </h5>
            <div class="ibox-tools">
                <a class="collapse-link">
                    <i class="fa fa-chevron-up"></i>
                </a>
                <a class="dropdown-toggle" data-toggle="dropdown" href="#">
                    <i class="fa fa-wrench"></i>
                </a>
                <ul class="dropdown-menu dropdown-user">
                    <li>
                        <a href="#">选项1</a>
                    </li>
                    <li>
                        <a href="#">选项2</a>
                    </li>
                </ul>
                <a class="close-link">
                    <i class="fa fa-times"></i>
                </a>
            </div>
        </div>
        <div class="ibox-content">
            <div class="form-horizontal" >
             <div class="row">
                <div class="col-md-12">
                    <div class="form-horizontal">
                        <div class="col-md-6 col-sm-6 col-xs-12">
                            <div class="form-group" data-queryType="search">
                                <label class="hidden-xs col-md-3 col-sm-4 control-label">订单号：</label>
                                <div class="col-md-9 col-sm-8">
                                    <div class="input-group">
                                        <input type="text" name="wxOrder" class="form-control" id="wxOrder"  placeholder="请输入微信订单号">
                                    </div>
                                </div>
                            </div>
                        </div>

                        <div class="col-md-6 col-sm-6 col-xs-12">
                            <div class="form-group" data-queryType="search">
                                <label class="hidden-xs col-md-3 col-sm-4 control-label">微信订单总金额(单位：元)：</label>
                                <div class="col-md-9 col-sm-8">
                                    <div class="input-group">
                                        <input type="number" name="wxOrderMoney" id="wxOrderMoney" class="form-control" placeholder="请输入微信订单金额">
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="col-md-6 col-sm-6 col-xs-12">
                            <div class="form-group" data-queryType="search">
                                <label class="hidden-xs col-md-3 col-sm-4 control-label">要退还的金额(单位：元)：</label>
                                <div class="col-md-9 col-sm-8">
                                    <div class="input-group">
                                        <input type="number" name="wxMoney"   id="wxMoney"  class="form-control" placeholder="请输入要退还的金额">
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="col-md-12 col-sm-12 col-xs-12">
                            <div class="col-md-6 col-sm-6 col-xs-8 col-md-offset-3  col-sm-offset-3 col-xs-offset-2">
                                   <button type="button"   id="btn-sub" class="btn btn-block btn-danger">退款 </button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            </div>
        </div>
    </div>
</div>
</div>

</body>
<script src="/admin/frame/jquery/jquery-1.9.1.min.js"></script>
<script src="/admin/frame/layer/layer.js"></script>
<script src="/admin/js/myPlug.js"></script>
<script src="/admin/js/init.js"></script>

<script>
    $(function(){


       $("#btn-sub").click(function(){
           if($("#wxOrder").val()==""){
               layer.msg("参数错误");
               return false;
           }
           if($("#wxOrderMoney").val()==""){
               layer.msg("参数错误");
               return false;
           }
           if($("#wxOrderMoney").val()==""){
               layer.msg("参数错误");
               return false;
           }
           $.post("wxPayReFuPost",
               {
                   wxOrder:$("#wxOrder").val(),
                   wxOrderMoney:$("#wxOrderMoney").val()*100,
                   wxMoney:$("#wxMoney").val()*100,
               },
               function(data){
                   layer.msg(data.msg);
               });
       });
    })
</script>
</html>
